#include <iostream>
#include "Sales_item.h"

int main()
{
	Sales_item total, trans;
	std::cout << "Enter some records with same ISBN:";

	if (std::cin >> total) {
		while (std::cin >> trans) {
			if (compareIsbn(total, trans)) {
				total = total + trans;
			} else {
				std::cout << "ISBN is different" << std::endl;

				return -1;
			}
			std::cout << "ISBN, count, average unit price:"
					  << total << std::endl;
		}
	} else {
		std::cout << "No data" << std::endl;

		return -1;
	}

	return 0;
}
